{% extends "base.html" %}

{% block subtitle %}
  Editor Prerequisites
{% endblock subtitle %}

{% block content %}
  <div class="container" ng-controller="EditorPrerequisites">
    <div class="row">
      <div class="col-lg-8 col-md-8 col-sm-8">
        <br>
        <h3 class="oppia-page-title">Welcome to the Oppia contributor community!</h3>
        <p>
          Just a couple of quick things before you start:
        </p>

        <h4>Licensing</h4>
        <p>
          All explorations on this site, and contributions to them, are deemed
          to be licensed under
          <a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank">CC-BY-SA v4.0,
          with a waiver of the attribution (BY) requirement</a>. This allows the content of
          explorations to be freely copied, reused, remixed and redistributed. The main
          condition is that if someone remixes, transforms or builds upon the material,
          they must also distribute their work under the same free license.
        </p>
        <p>
          The attribution waiver means that, if someone reuses this work, they are not
          required to attribute the authors. However, all of your individual
          contributions to explorations will be available on this site in the exploration
          change log, and people who reuse the exploration are encouraged (but not
          required) to include a link to this page.
        </p>
        <p>
          If you aren't happy with this, please do not continue past this page!
        </p>

        <h4>Community</h4>
        <p>
          This site exists to foster the creation and continual improvement
          of a set of high-quality learning explorations that are freely
          available to everyone. Please take a couple of minutes to read our
          <a href="/site_guidelines" target="_blank">site guidelines</a>,
          which explain how the exploration lifecycle works,
          as well as some basic do's and don'ts.
        </p>

        <h4>Paperwork</h4>
        <form ng-submit="submitPrerequisitesForm(agreedToTerms, username)">
          <div class="oppia-editor-prerequisites-form">
            <div ng-show="!hasUsername" class="form-group">
              <label for="username">My preferred Oppia username (to be shown in the exploration change logs)</label>
              <div class="row">
                <div class="col-lg-5 col-md-5 col-sm-5">
                  <input type="text" ng-model="username" id="username" class="form-control" ng-blur="onUsernameInputFormBlur(username)" ng-change="updateWarningText(username)" ng-trim="false">
                </div>
                <div class="col-lg-7 col-md-7 col-sm-7" style="color: red;" aria-live="assertive" ng-show="blurredAtLeastOnce">
                  <[warningText]>
                </div>
              </div>
            </div>

            <div class="checkbox">
              <label>
                <input type="checkbox" ng-model="agreedToTerms">
                {{agreement}}
              </label>
            </div>
          </div>
          <br>

          <button type="submit" class="btn btn-success" ng-disabled="warningText || !agreedToTerms">Submit and start contributing</button>
        </form>
        <br><br><br>
      </div>
    </div>
  </div>
{% endblock %}

{% block footer_js %}
  {{ super() }}
  <script>
    {{ include_js_file('/profile/EditorPrerequisites.js') }}
  </script>
{% endblock footer_js %}
